﻿namespace com.iot.core.boot
{
    public class MyApiResult
    {
        public int Code { get; set; }
        public string Msg { get; set; } = "";

        public object Data { get; set; }

        public static MyApiResult Success(object o)
        {
            var m = new MyApiResult();
            m.Data = o;
            return m;
        }
        public static MyApiResult Other(int code, string msg, object data)
        {
            var result = new MyApiResult();
            result.Code = code;
            result.Msg = msg;
            result.Data = data;
            return result;
        }
    }
}
